<? 
/*
+--------------------------------------------------------------------------
|   TalkBack Ticket System
|   ========================================
|   by Oliver Hayman
|   (c) 2007 OlliesPage.net
|   ========================================
|   
|   
+---------------------------------------------------------------------------
|   > $Date: 2007-09-02 16:56:14 +0000 (Sun, 02 Sep 2007) $
|   > $Author: Oliver Hayman $
+---------------------------------------------------------------------------
|
|   > MAIN
|   > Includes configuration file, creates database connections
|   > Defines headers and footers.
|   > Date started: Friday 03rd August 2007 (20:48)
|
+--------------------------------------------------------------------------
*/
if(!defined('noHeader')) {
echo "<!-- Code By Ollie -->\n";
echo "<title>TalkBack V1</title>\n"; }
// ----------------
// Database connect
// ----------------
if(!defined('Login')) {
mysql_connect($SQL_server, $SQL_user, $SQL_pass) or die('Could not connect: ' . mysql_error());
mysql_select_db($SQL_database) or die('Could not select database');
} else {
function MySQLConnect($moodle) {
global $SQL_server, $moodle_server, $SQL_user, $moodle_user, $SQL_pass, $moodle_pass, $SQL_database, $moodle_database;
if($moodle != 0) {
if(isset($moodle_server)) { $SQL_server = $moodle_server;}
if(isset($moodle_user)) { $SQL_user = $moodle_user; }
if(isset($moodle_pass)) { $SQL_pass = $moodle_pass; }
if($SQL_database != $moodle_database) { $SQL_database = $moodle_database; } 
}
mysql_connect($SQL_server, $SQL_user, $SQL_pass) or die('Could not connect: ' . mysql_error());
mysql_select_db($SQL_database) or die('Could not select database'); }
}

function footer() {
echo '<span class="smalltext"><center>TalkBack V1 &copy; <a class="footer" href="http://olliespage.net">OlliesPage.net</a>
<br />Licensed to: The oPanel Project</center></span>';
}
?>